﻿using SharpAnalyzer.Utilities;
using System;
using System.Collections.Generic;
using System.Xml.Linq;
using System.Xml.Serialization;

namespace SharpAnalyzer.Entities
{
    [XmlRoot(ElementName = "Type")]
    public class Type
    {
        public static readonly Type Empty = new Type();

        [XmlAttribute]
        public string Name { get; set; }

        [XmlAttribute]
        public TypeMetricKind Kind { get; set; }

        public List<Metric> Metrics { get; set; }

        public List<Member> Members { get; set; }

        [XmlIgnore]
        public IEnumerable<CodeSectionDeclarationSyntaxInfo> SyntaxNodes { get; set; }
    }

    public enum TypeMetricKind
    {
        Unknown,
        Class,
        Delegate,
        Interface,
        Struct,
        ValueType,
    }

}
